package com.copm.ifm.servers.sys.vo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.copm.ifm.base.api.util.DictFieldFillUtils;
import com.copm.ifm.base.basic.NameTag;
import com.copm.ifm.base.basic.enums.DictCodeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 项目表分页返回对象
 *
 * @author tp
 * @date 2020/12/15 14:45
 */
@Setter
@Getter
@ToString
public class SysProjectVO implements Serializable, NameTag {

    private Long id;

    @ApiModelProperty("城市")
    private String city;

    @ApiModelProperty("项目名称")
    private String proName;

    @ApiModelProperty("项目编码")
    private String proCode;

    @ApiModelProperty("项目图标")
    private String proLogo;

    @ApiModelProperty("外部系统编号")
    private String outCode;

    @ApiModelProperty("接管日期")
    private Date handTime;

    @ApiModelProperty("项目首页图片")
    private String proImage;

    @ApiModelProperty("项目分布图")
    private String proDistributePic;

    @ApiModelProperty("是否可用")
    private Integer enabled;

    @ApiModelProperty("项目编码")
    private Long tenantId;

    @ApiModelProperty("企业状态")
    private Integer tradeType;

    @ApiModelProperty("企业状态名称")
    private String tradeTypeName;

    @ApiModelProperty("项目对应租户的业务类型")
    private String businessType;

    @ApiModelProperty("建筑面积")
    private Integer buildArea;

    @ApiModelProperty("在管建筑面积(m2)")
    private Integer controlBuildArea;

    @ApiModelProperty("占地面积(m2)")
    private Integer usableArea;

    @ApiModelProperty("竣工日期")
    private Date buildDate;

    @ApiModelProperty("项目正式启动时间")
    private Date startTime;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty("授权开始时间")
    private Date authStartTime;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty("授权结束时间")
    private Date authEndTime;

    @ApiModelProperty("设置项目告警天数，单位默认是天")
    private Integer overdueTime;

    @ApiModelProperty("授权企业及机构")
    private String authCompany;

    @ApiModelProperty("容积率")
    private BigDecimal floorAreaRatio;

    @ApiModelProperty("纬度")
    private BigDecimal latitude;

    @ApiModelProperty("周界半径(米)")
    private Integer radius;

    @ApiModelProperty("经度")
    private BigDecimal longitude;

    @ApiModelProperty("创建人")
    private Long createBy;

    @ApiModelProperty("创建人名")
    private String createByName;

    @ApiModelProperty("修改人")
    private Long updateBy;

    @ApiModelProperty("修改人名")
    private String updateByName;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("修改时间")
    @TableField(fill = FieldFill.INSERT)
    private Date updateTime;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    public String getTradeTypeName() {
        return DictFieldFillUtils.getName(DictCodeEnum.TRADE_TYPE, tradeType, tradeTypeName);
    }
}
